-- GENERATED SPELL FOR [Xi'ri] --


function spell0_18528(pUnit, Event) --@Blinding Light,Self--
pUnit:FullCastSpellOnTarget(36950,pUnit)
pUnit:RegisterEvent('Sorts_18528', 6319, 1)
end

function spell1_18528(pUnit, Event) --@Light of the Naaru,Self--
pUnit:FullCastSpellOnTarget(39828,pUnit)
pUnit:RegisterEvent('Sorts_18528', 20000, 1)
end

function spell2_18528(pUnit, Event) --@Light of the Naaru,Self--
pUnit:FullCastSpellOnTarget(39831,pUnit)
pUnit:RegisterEvent('Sorts_18528', 645, 1)
end

function spell3_18528(pUnit, Event) --@Light of the Naaru,Self--
pUnit:FullCastSpellOnTarget(39832,pUnit)
pUnit:RegisterEvent('Sorts_18528', 624, 1)
end

function Sorts_18528(pUnit, Event)
local choix_sorts_18528 = math.random(0, 3)
if choix_sorts_18528 == 0 then
pUnit:RegisterEvent('spell0_18528', 1, 1)
end
if choix_sorts_18528 == 1 then
pUnit:RegisterEvent('spell1_18528', 1, 1)
end
if choix_sorts_18528 == 2 then
pUnit:RegisterEvent('spell2_18528', 1, 1)
end
if choix_sorts_18528 == 3 then
pUnit:RegisterEvent('spell3_18528', 1, 1)
end
end

function mob18528_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_18528', math.random(1500, 3000), 1)
end

function mob18528_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob18528_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob18528_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(18528, 1, 'mob18528_Action')
RegisterUnitEvent(18528, 2, 'mob18528_Leave')
RegisterUnitEvent(18528, 3, 'mob18528_Kill')
RegisterUnitEvent(18528, 4, 'mob18528_Die')
